local snax = require "snax"
local skynet = require "skynet"

 print("hotfix start")

 local obj = snax.self()

 snax.hotfix(obj, [[

 local command 
 local skynet
 local i
 function response.ping(lhello)
      skynet.sleep(101)
      return command.update("ddd")
 end 

 local hello
 function hotfix(...)
 local function get_local( func, name )  
     local i=1  
     local v_name, value  
     while true do  
         v_name, value = debug.getlocal(func,i)  
         if not v_name or v_name == name then  
             break  
         end  
         i = i+1  
     end  
     if v_name and v_name == name then  
         return value  
     end  
     return nil  
 end  
 local function set_local( func, name, value )  
     local i=1  
     local v_name  
     while true do  
         v_name, _ = debug.getlocal(func,i)  
         if not v_name or v_name == name then  
             break  
         end  
         i = i+1  
     end  
     if not v_name then  
         return false 
     end 
     debug.setlocal(func,i,value)
     return true  
 end  
     local temp =  command
     local t = get_local(command.update, "i")
     print(temp.update)
     temp.update = function(h) return ""..i.." "..tostring(h) end
     set_local(temp.update, "i", t)
     return "d"
 end


 ]])

 print("___________")
